﻿using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using FutureApp.Users;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace FutureApp.Person
{
    /// <summary>
    /// 主表
    /// </summary>
    [Table("Bag")]
    public class Bag : FullAuditedEntity<Guid, User>, IPassivable
    {
        /// <summary>
        /// <see cref="Name"/> 属性的最大长度
        /// </summary>
        public const int MaxNameLength = 30;

        /// <summary>
        /// 名称
        /// </summary>
        [Required]
        [StringLength(MaxNameLength)]
        public virtual string Name { get; set; }
        /// <summary>
        /// 颜色
        /// </summary>
        [Required]
        [StringLength(MaxNameLength)]
        public virtual string Color { get; set; }
        /// <summary>
        /// 激活/禁用
        /// </summary>
        [Required]
        public virtual bool IsActive { get; set; } = true;

        /// <summary>
        ///外键
        /// </summary>
        public virtual Guid StudentId { get; set; }

        /// <summary>
        ///外键
        /// </summary>
        [ForeignKey("StudentId")]
        public virtual Student Student_B { get; set; }
        



    }
}
